<?php
namespace app\controller;
//events callback
class IndexController{
	static public function onConnect($server, $fd)
	{
	   # $server->send($fd, "Connected!\r\n");
	}

	static public function onReceive($server, $fd, $from_id, $data)
	{
	    $server->send($fd, "Server :".$data);
		file_put_contents('/data/wwwroot/zhifeiji/receive.log',json_encode($data),FILE_APPEND);
	}

	static public function onClose($server, $fd)
	{
	}
}
